import { ModuleWithProviders } from '@angular/core'
import { Routes, RouterModule } from '@angular/router'

/**
 * 路由blank：作为中转跳转，解决菜单栏不能刷新的问题
 * 所有路由配置采用懒加载方式配置，提高首页加载速度
 */
export const routes: Routes = [
  {
    path: 'purchase-apply',
    loadChildren: 'app/+supply-chain/+purchase-apply/purchase-apply.module#PurchaseApplyModule'
  },
  {
    path: 'manufact-schedule',
    loadChildren: 'app/+supply-chain/+manufact-schedule/manufact-schedule.module#ManufactScheduleModule'
  },
  {
    path: 'sale-schedule',
    loadChildren: 'app/+supply-chain/+sale-schedule/sale-schedule.module#SaleScheduleModule'
  },
  {
    path: 'incoming-inspect-report', //来料检验报表
    loadChildren:
      'app/+supply-chain/+incoming-inspect-report/incoming-inspect-report.module#IncomingInspectReportModule'
  },
  {
    path: 'purchase-detail', //采购申请明细
    loadChildren: 'app/+supply-chain/+purchase-detail/purchase-detail.module#PurchaseDetailModule'
  },
  {
    path: 'purchase-order', //采购订单
    loadChildren: 'app/+supply-chain/+purchase-order/purchase-order.module#PurchaseOrderModule'
  },
  {
    path: 'purchase-apply/purchase-page', //新增/编辑采购申请
    loadChildren: 'app/+supply-chain/+purchase-page/purchase-page.module#PurchasePageModule'
  },
  {
    path: 'outsource-processing-apply', //委外加工申请
    loadChildren: 'app/+supply-chain/+outsource-processing-apply/outsource-processing-apply.module#OutsourceProcessingApplyModule'
  },
  {
    path: 'outsource-processing-apply/outsource-processing-page', //新增/编辑委外加工申请
    loadChildren: 'app/+supply-chain/+outsource-processing-page/outsource-processing-page.module#OutsourceProcessingPageModule'
  },
  {
    path: 'outsource-processing-order', //委外加工订单
    loadChildren: 'app/+supply-chain/+outsource-processing-order/outsource-processing-order.module#OutsourceProcessingOrderModule'
  },
  {
    path: 'make-test', //制程检测统计
    loadChildren: 'app/+supply-chain/+make-test/make-test.module#MakeTestModule'
  },
  {
    path: 'adverse-causes', //不良原因配置
    loadChildren: 'app/+supply-chain/+adverse-causes/adverse-causes.module#AdverseCausesModule'
  },
  {
    path: 'smt-detection', //SMT检测报表
    loadChildren: 'app/+supply-chain/+smt-detection/smt-detection.module#SmtDetectionModule'
  },
  {
    path: 'burner-test', //PCBA烧录测试报表
    loadChildren: 'app/+supply-chain/+burner-test/burner-test.module#BurnerTestModule'
  },
  {
    path: 'host-assembly-test', //主机组装测试报表
    loadChildren: 'app/+supply-chain/+host-assembly-test/host-assembly-test.module#HostAssemblyTestModule'
  },
  {
    path: 'smt-detection/smt-detection-page', //新增/编辑SMT检测
    loadChildren: 'app/+supply-chain/+smt-detection-page/smt-detection-page.module#SmtDetectionPageModule'
  },
  {
    path: 'host-report', //主机检验报表
    loadChildren:
      'app/+supply-chain/+host-report/host-report.module#HostReportModule'
  },
  {
    path: 'host-report-detail', //主机检验明细
    loadChildren:
      'app/+supply-chain/+host-report-detail/host-report-detail.module#HostReportDetailModule'
  },
]

export const routing = RouterModule.forChild(routes)
